Skip to content

[App Service] az webapp troubleshoot status: provide latest application startup attempt data#33673

Draft
aamos-company wants to merge 4 commits into
Azure:devfrom
aamos-company:developer/amberamos/troubleshootcommand
Draft

[App Service] az webapp troubleshoot status: provide latest application startup attempt data#33673
aamos-company wants to merge 4 commits into
Azure:devfrom
aamos-company:developer/amberamos/troubleshootcommand

Conversation

@aamos-company

@aamos-company aamos-company commented Jun 29, 2026

Copy link
Copy Markdown

Related command

Description
Introduces a new command group  az webapp troubleshoot and its first command,  az webapp troubleshoot status, which surfaces per-instance runtime health plus a 24-hour startup-attempt summary for a Linux web app.

What's new
Command:  az webapp troubleshoot status -n -g [--slot ] [--instance ] [--report] 

• Data sources
• ARM  GET /sites/{name}/instances  → resolves user-supplied  --instance  (accepts either the hex ARM  instanceId  or the friendly  machineName ) and pulls  properties.machineName 
• ARM  GET /sites/{name}/siteStatus[/{instance}]  → per-instance runtime  state ,  action ,  details ,  lastError ,  lastErrorTimestamp .
• KuduLite  GET /api/startuplogs/summary  → 24 h startup-attempt counts and most-recent success/failure timestamps per worker, in a single unfiltered call (fanning out per-instance was 4 RTT with  ThreadPoolExecutor ; this is 1 RTT regardless of N).
• Linux only — errors early on Windows with a clear message. Site Runtime Status is a Linux-only feature.
• Preview — command group registered as preview per RP guidelines.

image image

@azure-client-tools-bot-prd

Copy link
Copy Markdown
Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @aamos-company,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd

Copy link
Copy Markdown
Validation for Breaking Change Starting...

Thanks for your contribution!

@aamos-company aamos-company marked this pull request as draft June 29, 2026 21:23
@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jun 29, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution @aamos-company! We will review the pull request and get back to you soon.

@aamos-company aamos-company changed the title Create Troubleshoot Command for Linux [App Service] az webapp troubleshoot: provide latest application startup attempt data Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the App Service command module with new runtime-status troubleshooting capabilities by introducing a webapp status command (ARM siteStatus) and a preview webapp troubleshoot status command (ARM siteStatus + SCM startup summary), plus associated help, params, and tests.

Changes:

  • Add az webapp status to fetch per-instance Site Runtime Status (ARM siteStatus), including --instance filtering and table formatting.
  • Add preview az webapp troubleshoot status to combine ARM runtime status with SCM startup summary, rendered as a human-readable report for table output.
  • Add scenario + mocked tests and a new recording; update HISTORY entry.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/azure-cli/HISTORY.rst Adds history note for the new az webapp status command.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py Adds live scenario coverage for az webapp status.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py Adds mocked unit tests for troubleshoot status, webapp status, and output transform behavior.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_status.yaml Adds VCR recording for the new scenario test.
src/azure-cli/azure/cli/command_modules/appservice/custom.py Implements show_webapp_status, troubleshoot_status, formatting, and status-tip logging.
src/azure-cli/azure/cli/command_modules/appservice/commands.py Registers new commands and table transformers.
src/azure-cli/azure/cli/command_modules/appservice/_params.py Adds --instance parameter wiring for webapp status and webapp troubleshoot status.
src/azure-cli/azure/cli/command_modules/appservice/_help.py Adds help for webapp status and the preview webapp troubleshoot group/command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/appservice/custom.py Outdated
for item in runtime_items:
_fetch_startup_summary(item)

# --- 3. Assemble payload ---
@yonzhan

yonzhan commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

App Service

@aamos-company aamos-company changed the title [App Service] az webapp troubleshoot: provide latest application startup attempt data [App Service] az webapp troubleshoot status: provide latest application startup attempt data Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants